Klasse PDFC

java.lang.Object
com.inet.pdfc.PDFC

public class PDFC extends Object
Main entry point into i-net PDFC

Example 1: "java -cp "java/inetcore.jar" com.inet.Start cmd c:\folder1 c:\folder2 -c c:\myconfig.xml"
Compares all PDF files in the two folders which have the same name, using the configuration file to pre-configure PDFC.

Example 2: "java -cp "java/inetcore.jar" com.inet.Start cmd c:\folder1\report1.pdf c:\folder2\report1.pdf"
Compares the two PDF files, using the standard configuration settings.

  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifikator und Typ
    Klasse
    Beschreibung
    class 
    This class gathers the configuration parameters to run a comparison, except the files to compare.
    protected static enum 
    Enum of all known command line switches and options, along with their long and short for and info about their default value and whether they require a parameter
  • Konstruktorübersicht

    Konstruktoren
    Modifikator
    Konstruktor
    Beschreibung
    protected
    PDFC(File original, File toCompare, Map<PDFC.PROP, String> props)
    Creates the command line executor
  • Methodenübersicht

    Modifikator und Typ
    Methode
    Beschreibung
    static final void
    activateLicense(String activationOrLicenseKey)
    This method activates an activation key or a license key.
    protected PDFComparer
    createComparer(boolean setRetryFlag)
    Applies the parsed properties and creates the comparer
    static String
    getVersion(boolean appendBeta, boolean appendValidTime)
    Returns the current version of PDFC as a String in the format: MAJOR.MINOR.Build number
    static void
    main(String[] args)
    Starts i-net PDFC with the given arguments - either two folders or two files.
    protected void
    Runs the comparison or executes the non-comparing command line arguments

    Von Klasse geerbte Methoden Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • PDFC

      protected PDFC(File original, File toCompare, Map<PDFC.PROP, String> props)
      Creates the command line executor
      Parameter:
      original - the original / first file to be compared, may be null
      toCompare - the new / second file to be compared, may be null
      props - the additional valid command line properties, may be null
      Seit:
      3.5
  • Methodendetails

    • main

      public static void main(String[] args) throws InvalidPropertiesFormatException
      Starts i-net PDFC with the given arguments - either two folders or two files. Optionally you can set the location of the config.xml with "-c", if you does not use the default config.xml. With the argument "-i" you can specify, that an image with the differences will be created for each page of the PDF files. If the argument "-o" is specified, then an image for each compared page of the PDF files will be created. For request and activate a trial license is the argument -a. If missing a license it get an exit code 2.

      Example 1: new String[] { "c:\folder1", "c:\folder2", "-c c:\myconfig.xml" }
      Compares all PDF files in the two folders which have the same name, using the configuration file to pre-configure PDFC.

      Example 2: new String[] { "c:\folder1\report1.pdf", "c:\folder2\report1.pdf" }
      Compares the two PDF files, using the standard configuration settings.

      Parameter:
      args - arguments to start PDFC with - either two folders or two files, and optionally the "-c" and "-i" parameter.
      Löst aus:
      InvalidPropertiesFormatException - if the configuration file (config.xml) has a wrong format
      Seit:
      1.0
    • runComparison

      protected void runComparison() throws InvalidPropertiesFormatException
      Runs the comparison or executes the non-comparing command line arguments
      Löst aus:
      InvalidPropertiesFormatException - if the file is not a valid xml configuration file.
      Seit:
      1.0
    • createComparer

      protected PDFComparer createComparer(boolean setRetryFlag) throws IllegalArgumentException, InvalidPropertiesFormatException
      Applies the parsed properties and creates the comparer
      Parameter:
      setRetryFlag - true to advice the comparer to set the ComparatorProperty.retryOnLowMemory flag
      Gibt zurück:
      the configured comparer
      Löst aus:
      IllegalArgumentException - if the configuration file does not exist.
      InvalidPropertiesFormatException - if the file is not a valid xml configuration file.
      Seit:
      1.0
    • getVersion

      public static String getVersion(boolean appendBeta, boolean appendValidTime)
      Returns the current version of PDFC as a String in the format: MAJOR.MINOR.Build number
      Parameter:
      appendBeta - if true the word "BETA" will be appended in case of a beta version
      appendValidTime - if true, the expiration will be appended in case of a beta version
      Gibt zurück:
      the current version of PDFC
      Seit:
      1.0
    • activateLicense

      public static final void activateLicense(String activationOrLicenseKey) throws IOException
      This method activates an activation key or a license key. The two types of key have a different purpose:
      • Activation key:
        Can be used on any system to set a license. The activation requires an active Internet connection and will bind the key to the current system.
      • License key
        A license key contains the license data and the system ID of the system it is valid for. So it does not require an Internet connection to activate, but it's only valid on one system.
      Please note that this method will block until it has finished.
      Parameter:
      activationOrLicenseKey - the activation or license key to be set
      Löst aus:
      IOException - thrown if an activation key was passed to the function but the connection to the license server could not be established
      com.inet.pdfc.generator.InvalidLicenseException - in case the activated license is invalid
      Seit:
      4.0